/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package motiveai.tests;

import com.jme3.font.BitmapFont;
import com.jme3.font.BitmapText;
import com.jme3.font.Rectangle;
import com.jme3.math.ColorRGBA;
import com.jme3.renderer.Camera;
import com.jme3.renderer.queue.RenderQueue.Bucket;
import com.jme3.scene.Node;

/**
 *
 * @author oxplay
 */
public class StateWin {
    public StateWin(Node rootNode, Node guiNode, BitmapFont guiFont, Camera cam){
        rootNode.detachAllChildren();
        BitmapText hudText = new BitmapText(guiFont, false);          
        hudText.setSize(guiFont.getPreferredSize() * 2);
        hudText.setColor(ColorRGBA.Gray);
        hudText.setText("You Win!");
        hudText.setLocalTranslation(cam.getWidth()/2 - (hudText.getLineWidth() / 2), cam.getHeight()/2 - (hudText.getLineHeight() / 2), 0);
        guiNode.attachChild(hudText);
    }
}
